package com.mmy;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@ComponentScan(basePackages = "com.mmy.controller")
@ComponentScan(basePackages = "com.mmy.service")
@EnableJpaRepositories(basePackages = "com.mmy.dao")
@MapperScan("com.mmy.mapper")
@EntityScan("com.mmy.domain")
@SpringBootApplication
public class DemoApplication extends SpringBootServletInitializer {
	
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(DemoApplication.class);
	}
	
	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
		System.out.println("                                                   \r\n"
				+ "                                                   \r\n"
				+ "(♥◠‿◠)ﾉﾞ    the mmy loading completed   ლ(´ڡ`ლ)ﾞ   good luck !!!  \n"
				+ "                                                   \r\n"
				+ " __  __   ___     __  __   ___                     \r\n"
				+ "|  |/  `.'   `.  |  |/  `.'   `.   .-.          .- \r\n"
				+ "|   .-.  .-.   ' |   .-.  .-.   '   \\ \\        / / \r\n"
				+ "|  |  |  |  |  | |  |  |  |  |  |    \\ \\      / /  \r\n"
				+ "|  |  |  |  |  | |  |  |  |  |  |     \\ \\    / /   \r\n"
				+ "|  |  |  |  |  | |  |  |  |  |  |      \\ \\  / /    \r\n"
				+ "|  |  |  |  |  | |  |  |  |  |  |       \\ `  /     \r\n"
				+ "|__|  |__|  |__| |__|  |__|  |__|        \\  /      \r\n"
				+ "                                         / /       \r\n"
				+ "                                     |`-' /        \r\n"
				+ "                                      '..'         ");
	}

}
